@model ExpertSMS.Models.Unit

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

<fieldset>
    <legend>Unit</legend>

    <div class="display-label">Name</div>
    <div class="display-field">@Model.Name</div>

    <div class="display-label">ConvertingFactor</div>
    <div class="display-field">@String.Format("{0:F}", Model.ConvertingFactor)</div>

    <div class="display-label">ParentUnit</div>
    <div class="display-field">@(Model.ParentUnit == null ? "None" : Model.ParentUnit.Name)</div>

    <div class="display-label">ChildUnits</div>
    <div class="display-field">@(Model.ChildUnits == null ? "None" : Model.ChildUnits.Count.ToString())</div>

    <div class="display-label">Product</div>
    <div class="display-field">@(Model.Product == null ? "None" : Model.Product.Name)</div>
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id=Model.UnitID }) |
    @Html.ActionLink("Back to List", "Index")
</p>


